# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Contributor: Stefan Tatschner <stefan@rumpelsepp.org>

pkgname=yadm
pkgver=3.2.2
pkgrel=1
pkgdesc="Yet Another Dotfiles Manager"
arch=('any')
url="https://github.com/TheLocehiliosan/yadm"
license=('GPL3')
depends=('git' 'awk')
optdepends=('gnupg: encrypt/decrypt sensitive files'
            'python-j2cli: use jinja2 templates'
            'esh: use shell templates')
source=("$pkgname-$pkgver.tar.gz::https://github.com/TheLocehiliosan/${pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('c61da3f644c2f587079fd717d4ef566861f20224f287906ef5b6d07169bc5f02aef7974afd8d4441267a92417a4fd0c7edda562b8f0cf2fc104c91fc0f5f85ff')
b2sums=('24dceda15f8bcb85df64fce987409feb4a94fac4dacb34f246ee11557e280ca1df3569f6b110fb2de02e6b756e82261a4da1896187b670df1c5e8edf123353cc')

package() {
	cd $pkgname-$pkgver
	install -vDm755 yadm -t "$pkgdir/usr/bin"
	install -vDm644 yadm.1 -t "$pkgdir/usr/share/man/man1"
	install -vDm644 completion/bash/yadm -t "${pkgdir}/usr/share/bash-completion/completions"
	install -vDm644 completion/zsh/_yadm -t "${pkgdir}/usr/share/zsh/site-functions"
	install -vDm644 completion/fish/yadm.fish -t "${pkgdir}/usr/share/fish/vendor_completions.d"
}
